let str = 'abce'
let reg1 = /[a-c]/g
let reg2 = /[A-Z]$/
console.log(reg2.test(str))
console.log(reg2.exec(str))
